/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cput.tp.patterns.structural.adapterpattern;

/**
 *
 * @author Malotana
 */
public class TemperatureClassReporter extends CelciusRepoter implements TemperatureInfo{
    
    @Override
    public double getTemperatureInf(){
        return cToF(temperatureInC);
    }

    @Override
    public void setTemperatureInf(double temperature){
       this.temperatureInC = fToC(temperature);
    }

    @Override
    public double getTemperatureInc(){
        return temperatureInC;
    }

    @Override
    public void setTemperatureInc(double temperature){
        this.temperatureInC = temperature;
    }
    
    private double fToC(double f){
            return((f-32)*5/9);
    }
    
    private double cToF(double c){
        return ((c-9/5)+32);
    }
}
